import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'default',
      component: resolve => require(['../components/dashboard'], resolve),
      redirect: {name: 'home'}
    },
    {
      path: '/dashboard',
      name: 'dashboard',
      component: resolve => require(['../components/dashboard'], resolve),
      children: [
        {
          path: 'home',
          name: 'home',
          component: resolve => require(['../components/home'], resolve)
        },
        {
          path: 'AboutUsManagement',
          name: '关于我们',
          component: resolve => require(['../components/AboutUsManagement/AboutUsManagement'], resolve),
          children: [
            {
              path: 'AboutUsBrowser',
              name: '关于我们',
              component: resolve => require(['../components/AboutUsManagement/AboutUsBrowser'], resolve)
            },
          ]
        },
        {
          path: 'ConnectUsManagement',
          name: '联系我们',
          component: resolve => require(['../components/ConnectUsManagement/ConnectUsManagement'], resolve),
          children: [
          {
            path: 'ConnectUsBrowser',
            name: '联系我们',
            component: resolve => require(['../components/ConnectUsManagement/ConnectUsBrowser'], resolve)
            // children: [
            // {
            //   path: 'LeaveWord',
            //   name: '留言',
            //   component: resolve => require(['../components/ConnectUsManagement/LeaveWord/LeaveWord'], resolve)
            // }
            // ]
          },
          ]
        },
        {
          path: 'HomeManagement',
          name: '首页',
          component: resolve => require(['../components/HomeManagement/HomeManagement'], resolve),
          children: [
            {
              path: 'HomeBrowser',
              name: '首页',
              component: resolve => require(['../components/HomeManagement/HomeBrowser'], resolve)
            },
          ]
        },
        {
          path: 'NewsManagement',
          name: '新闻资讯',
          component: resolve => require(['../components/NewsManagement/NewsManagement'], resolve),
          children: [
            {
              path: 'NewsBrowser',
              name: '新闻资讯',
              component: resolve => require(['../components/NewsManagement/NewsBrowser'], resolve)
            },
          ]
        },
        {
          path: 'ProductManagement',
          name: '产品展示',
          component: resolve => require(['../components/ProductManagement/ProductManagement'], resolve),
          children: [
            {
              path: 'ProductBrowser',
              name: '产品展示',
              component: resolve => require(['../components/ProductManagement/ProductBrowser'], resolve)
            },
          ]
        },
        
        // {
        //   path: 'LogManagement/SystemExceptionReport',
        //   name: '服务器管理',
        //   component: resolve => require(['../components/LogManagement/SystemExceptionReport'], resolve)
        // },
        // {
        //   path: 'LogManagement/SystemExceptionReport',
        //   name: '集群管理',
        //   component: resolve => require(['../components/LogManagement/SystemExceptionReport'], resolve)
        // }
      ]
    }
  ]

})
